Modeling Partiality by Nondeterminism { from Abstract Speciications to Exible Error Handling

نویسنده

  • Yngve Lamo
چکیده

The paper presents a new way to model partial operations by use of nondeterminism: a partial operation is modeled as a nondeterministic operation returning, possibly, any value of the carrier. We introduce an institution of multialgebras MA (modelling nondeterministic operations by set-valued functions) and illustrate the exibility of our approach by examples showing uniform treatment of strictness, non-strictness and various error handling. We present a methodology for speciication development from an abstract speciication to low level error handling. We also study the conditions for MA speciications to ensure the existence of initial models. Finally we relate MA to other institutions, in particular, we show embedding of partial algebras and membership algebras into MA. Applying institution transformation instead of embedding leads to the possibility of resuing partial algebra speciications in the proposed framework { a partial algebra speciication can be conservatively (preserving the models) imported to MA while the extension of the model class allows for furhter development towrds explicit error treatement.

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Protective Interface Speci cations 1

The interface speciication of a procedure describes the procedure's behavior using pre-and postconditions. These pre-and postconditions are written using various functions. If some of these functions are partial, or underspec-iied, then the procedure speciication may not be well-deened. We show how to write pre-and postcondition speciications that avoid such problems, by having the precondition...

متن کامل

Speci cation and Data Re nement in Type

We develop a type-theoretic approach to program speciication and data reene-ment and show that a type theory with a strong logical power and nice structural mechanisms provides an adequate formalism for modular development of programs and speciications. Speciication of abstract data types is considered and a notion of abstract implementation between speciications is deened in the type theory an...

متن کامل

Languages for Reactive Specifications: Synchrony Vs Asynchrony

Asynchronous and Synchronous languages have been in use for the speciication of reactive systems. One of the main distinguishing features of these two classes lies in the way nondeterminism is used for the specii-cation of programs. From this viewpoint, we analyze CSP (a typical asynchronous language) and Esterel (a synchronous language). The synchronous language Esterel is based on the notions...

متن کامل

Generic models for computational effects

AFreyd-category is a subtle generalisation of the notion of a categorywith finite products. It is suitable formodelling environments in call-by-value programming languages, such as the computational -calculus, with computational effects.We develop the theory of Freyd-categorieswith that inmind.Wefirst show that any countable Lawvere theory, hence any signature of operationswith countable arity ...

متن کامل

Discrete Lawvere theories and computational effects

Countable Lawvere theories model computational effects such as exceptions, side-effects, interactive input/output, nondeterminism and probabilistic nondeterminism. The category of countable Lawvere theories has sums, tensors, and distributive tensors, modelling natural combinations of such effects. It is also closed under taking images. Enrichment in a category such as Cpo allows one to extend ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1999